"""
This file demonstrates two different styles of tests (one doctest and one
unittest). These will both pass when you run "manage.py test".

Replace these with more appropriate tests for your application.
"""

from django.test import TestCase
from game.encounter.models import encounter
from game.encounter.models import reward

class baseEncounterTestCase(TestCase):
    def setUp(self):
        self.encounter = encounter.objects.create(message="This is an encounter")
        self.reward1 = reward.objects.create(encounter=self.encounter, probability=1)
        
    def tearDown(self):
        encounter.delete(self.encounter)
        reward.delete(self.reward1)
        
    def testGenerateRewards(self):
        self.assertEquals(self.encounter.generateRewards()[0],(self.reward1,1))